package com.hui.platform.falseworkapi.common.core.exception.throwing;


import com.hui.platform.falseworkapi.common.core.I18nMessage;
import com.hui.platform.falseworkapi.common.core.exception.BaseException;
import com.hui.platform.falseworkapi.common.core.exception.IThrow;

/**
 * 自定义异常断言接口
 *
 * @author Peng
 * @date 2019/11/11
 */
public interface CommonExceptionThrow extends I18nMessage, IThrow {

    @Override
    default BaseException newException() {
        return new BaseException(this);
    }

    @Override
    default BaseException newException(Throwable cause){
        return  new BaseException(this,cause);
    }

}
